#ifndef IMAGERECOGNIZE_H
#define IMAGERECOGNIZE_H

#include <QObject>
#include <QCoreApplication>
#include <QSqlDatabase>
#include <QSqlQuery>
#include <QSqlError>
#include <QDebug>
#include <QDateTime>
#include <QString>
#include <QProcess>
#include <QFileInfo>
#include "MySql.h"
#include "Aliyun.h"
#include <QJsonParseError>
#include <QJsonArray>
#include <QJsonObject>
#include <QSqlQueryModel>
#include <QStandardItem>
#include <QThread>


class ImageRecognize :public QThread
{
    Q_OBJECT
public:
    explicit ImageRecognize(const QStringList & arguments,QObject *parent = nullptr);
    ~ImageRecognize();
    void setfileinfo(const QFileInfo &fileInfo);

//    void recognize(QStringList arguments); //const QString &filePath
//    void statis(QStringList arguments,MySql *mysql,QStandardItemModel *table);
//    QFileInfo getFileInfo()const;
//    void seturl(const QString imgurl);
//    QString geturl() const;


public slots:
    void recognize(); //const QString &filePath
    void statis();

signals:
    void Finshed(const QString & content);
    void FinshedQuery(QStandardItemModel *table);




private:
    QString invoice_number;
    QDateTime invoice_date;
    float total_amount;
    float tax_amount;
    QString sell_name;
    QString buyer_name;
    QString url;
    QStandardItemModel *table;
    QStandardItemModel *m_uploadHistoryModel;
    QStringList arguments;
    Aliyun *llm;
    QFileInfo fileInfo;
};

#endif // IMAGERECOGNIZE_H
